﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiWebLightTraits : OdGiPointLightTraits
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiWebLightTraits(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiWebLightTraits_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiWebLightTraits obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiWebLightTraits()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiWebLightTraits(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdGiWebLightTraits cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiWebLightTraits_cast(OdRxObject.getCPtr(pObj));
			OdGiWebLightTraits result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiWebLightTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiWebLightTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiWebLightTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiWebLightTraits_desc(), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiWebLightTraits_isA(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdGiWebLightTraits_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdGiWebLightTraits createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdGiWebLightTraits_createObject();
			OdGiWebLightTraits result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdGiWebLightTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdGiWebLightTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdGiWebLightTraits)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setWebFile(string fileName)
		{
			GlobalsPINVOKE.OdGiWebLightTraits_setWebFile(this.swigCPtr, fileName);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual string webFile()
		{
			string result = GlobalsPINVOKE.OdGiWebLightTraits_webFile(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setWebRotation(OdGeVector3d fRot)
		{
			GlobalsPINVOKE.OdGiWebLightTraits_setWebRotation(this.swigCPtr, OdGeVector3d.getCPtr(fRot));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGeVector3d webRotation()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGiWebLightTraits_webRotation(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setWebFlux(double fFlux)
		{
			GlobalsPINVOKE.OdGiWebLightTraits_setWebFlux(this.swigCPtr, fFlux);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual double webFlux()
		{
			double result = GlobalsPINVOKE.OdGiWebLightTraits_webFlux(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setWebFileType(OdGiWebLightTraits.WebFileType type)
		{
			GlobalsPINVOKE.OdGiWebLightTraits_setWebFileType(this.swigCPtr, (int)type);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGiWebLightTraits.WebFileType webFileType()
		{
			OdGiWebLightTraits.WebFileType result = (OdGiWebLightTraits.WebFileType)GlobalsPINVOKE.OdGiWebLightTraits_webFileType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setWebSymmetry(OdGiWebLightTraits.WebSymmetry sym)
		{
			GlobalsPINVOKE.OdGiWebLightTraits_setWebSymmetry(this.swigCPtr, (int)sym);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdGiWebLightTraits.WebSymmetry webSymmetry()
		{
			OdGiWebLightTraits.WebSymmetry result = (OdGiWebLightTraits.WebSymmetry)GlobalsPINVOKE.OdGiWebLightTraits_webSymmetry(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setWebHorzAng90to270(bool bFlag)
		{
			GlobalsPINVOKE.OdGiWebLightTraits_setWebHorzAng90to270(this.swigCPtr, bFlag);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual bool webHorzAng90to270()
		{
			bool result = GlobalsPINVOKE.OdGiWebLightTraits_webHorzAng90to270(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		public enum WebFileType
		{
			kTypeA = 3,
			kTypeB = 2,
			kTypeC = 1
		}

		public enum WebSymmetry
		{
			kNoSymmetry,
			kSingleSymmetry,
			kDoubleSymmetry,
			kAxialSymmetry
		}
	}
}
